home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / tobby_ur.swf / scripts / DefineSprite_58_player_hand / frame_1 / DoAction.as
Encoding:
Text File  |  2010-11-09  |  941 b   |  62 lines

  1. function main()
  2. {
  3.    if(this.procNum == 1)
  4.    {
  5.       this.move();
  6.    }
  7.    if(this.procNum == 2)
  8.    {
  9.       this.stopmove();
  10.    }
  11.    if(this.procNum == 3)
  12.    {
  13.       this.move();
  14.       this.muteki();
  15.    }
  16. }
  17. function move()
  18. {
  19.    if(_root.gPlayFlg == true)
  20.    {
  21.       this.px = _root._xmouse;
  22.       this.py = _root._ymouse;
  23.    }
  24. }
  25. function stopmove()
  26. {
  27.    this._visible = !this._visible;
  28.    this.pCnt--;
  29.    if(0 >= this.pCnt)
  30.    {
  31.       this.pCnt = 30;
  32.       this.procNum = 3;
  33.    }
  34. }
  35. function muteki()
  36. {
  37.    this._visible = !this._visible;
  38.    this.pCnt--;
  39.    if(0 >= this.pCnt)
  40.    {
  41.       this.procNum = 1;
  42.       this._visible = true;
  43.    }
  44. }
  45. function miss()
  46. {
  47.    if(this.procNum == 1)
  48.    {
  49.       _root.scrollSpeed = 1;
  50.       this.pCnt = 10;
  51.       this.procNum = 2;
  52.    }
  53. }
  54. function clrMC()
  55. {
  56.    this.removeMovieClip();
  57. }
  58. this.px = 250;
  59. this.py = 270;
  60. this.procNum = 1;
  61. this.pCnt = 0;
  62.